﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MVCFoto.Web.ViewData.AlbumIndexViewData>" %><%@ Import Namespace="MVCFoto.Web.Utility" %><?xml version="1.0" encoding="UTF-8" ?> 
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:gml="http://www.opengis.net/gml" xmlns:georss="http://www.georss.org/georss" version="2.0">
 <channel>
  <atom:id><%=Html.AbsoluteUrl(Url.RouteUrl("Album", new { id = Model.Album.AlbumID }))%></atom:id> 
  <lastBuildDate><%=DateTime.Now.ToUniversalTime().ToString() %></lastBuildDate> 
  <category domain="<%=Html.AbsoluteUrl(Url.RouteUrl("Album", new { id = Model.Album.AlbumID }))%>"><%=Html.AbsoluteUrl(Url.RouteUrl("Album", new { id = Model.Album.AlbumID }))%></category> 
  <title><%=Html.Encode(Model.Album.Title) %></title> 
  <description><%=Html.Encode(Model.Album.Desc) %></description> 
 <image>
  <url><%=Html.AbsoluteUrl(Model.Album.CoverPhoto)%></url> 
  <title><%=Html.Encode(Model.Album.Title) %></title> 
  <link><%=Html.AbsoluteUrl(Url.RouteUrl("Album", new { id = Model.Album.AlbumID }))%></link> 
  </image>
  <link><%=Html.AbsoluteUrl(Url.RouteUrl("Album", new { id = Model.Album.AlbumID }))%></link> 
  <managingEditor><%=Model.User.UserName %></managingEditor> 
  <generator>MVCFoto</generator> 
  <%foreach (MVCFoto.Model.PhotoInfo photo in Model.Photos)
    { %>
 <item>
  <guid isPermaLink="false"><%=Html.AbsoluteUrl(Url.RouteUrl("Photo", new { id = photo.PhotoID }))%></guid> 
  <pubDate><%=photo.CreateDate.ToUniversalTime() %></pubDate> 
  <atom:updated><%=DateTime.Now.ToUniversalTime() %></atom:updated> 
  <category domain="<%=Html.AbsoluteUrl(Url.RouteUrl("Album", new { id = Model.Album.AlbumID }))%>"><%=Html.AbsoluteUrl(Url.RouteUrl("Album", new { id = Model.Album.AlbumID }))%></category> 
  <title><%=Html.Encode(photo.Title)%></title> 
  <description>
  <%=Html.Encode(photo.Desc)%>
  </description> 
  <enclosure type="image/jpeg" url="<%=Html.AbsoluteUrl(photo.Photo)%>" length="<%=photo.FileSize %>" /> 
  <link><%=Html.AbsoluteUrl(Url.RouteUrl("Photo", new { id = photo.PhotoID }))%></link> 
 <%-- <image><%=Html.AbsoluteUrl(Html.ThumbnailUrl(photo.Photo,288))%></image>--%>
 <media:group>
  <media:content url="<%=Html.AbsoluteUrl(photo.Photo)%>" type="image/jpeg" medium="image" /> 
  <media:credit><%=Model.User.UserName %></media:credit> 
  <media:description type="plain" /> 
  <media:keywords /> 
  <media:thumbnail url="<%=Html.AbsoluteUrl(Html.ThumbnailUrl(photo.Photo,72))%>" /> 
  <media:thumbnail url="<%=Html.AbsoluteUrl(Html.ThumbnailUrl(photo.Photo,144))%>"/> 
  <media:thumbnail url="<%=Html.AbsoluteUrl(Html.ThumbnailUrl(photo.Photo,288))%>" /> 
  <media:title type="plain"><%=Html.Encode(photo.Title)%></media:title> 
  </media:group>
  </item>
  <%} %>
  </channel> 
</rss>